package com.example.test

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import com.zee.adapter.LetsGoAdapter
import com.zee.route.ZRouter
import com.zee.utils.UIUtils

import com.zee.utils.ZEventBusUtils
import kotlinx.android.synthetic.main.activity_test_a.*

import org.greenrobot.eventbus.Route
import org.greenrobot.eventbus.SubscribeMainThread

@Route(name = "测试A", module = "测试",keyWords = "登录,验证")
class TestAActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_test_a)
        id_testA_text.text = intent.getStringExtra("key")
        ZEventBusUtils.register(this)
        id_testA_text.setOnClickListener {
            ZRouter.getInstance().startActivity("测试B").letsGo(object : LetsGoAdapter() {
                override fun onEnd() {
                    UIUtils.postDelayed({
//                        UIUtils.showDialog(TestDialog())
                    }, 1000)
                }
            })
        }
    }

    @SubscribeMainThread(tag = "测试代码")
    fun testEventBus(value: Int) {
    }
}
